package com.tinyideatech.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tinyideatech.common.utils.StringUtils;
import com.tinyideatech.system.entity.SysMenu;
import com.tinyideatech.system.mapper.SysMenuMapper;
import com.tinyideatech.system.mapper.SysRoleMenuMapper;
import com.tinyideatech.system.service.ISysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

@Service
public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> implements ISysMenuService {

    @Autowired
    private SysRoleMenuMapper roleMenuMapper;

    @Override
    public Set<String> selectPermsByUserId(Long userId) {
        return roleMenuMapper.selectRoleKeysByUserId(userId);
    }
}
